{% extends 'dish/dish_base.html' %}
{% block title %}
    新增菜
{% endblock %}
{% block content %}
    <ol class="breadcrumb">
          <li><a href="#">首页</a></li>
          <li><a href="#">菜管理</a></li>
          <li class="active">新增菜</li>
    </ol>
    <form class="form-horizontal" action="{{ url_for("dish.add_dish") }}" method="post">
          <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">菜名</label>
            <div class="col-sm-10">
              <input type="text" class="form-control" name="dish_name" id="inputEmail3" placeholder="菜名">
            </div>
          </div>
          <div class="form-group">
            <label for="inputPassword3" class="col-sm-2 control-label">价格</label>
            <div class="col-sm-10">
              <input type="number" class="form-control" id="inputPassword3" name="price">
            </div>
          </div>
        <div class="form-group">
            <label for="inputEmail3" class="col-sm-2 control-label">菜品名</label>
            <div class="col-sm-10">
                <label>
                    <select class="form-control" name="dish_type_no">
                        {% for dish_type in dish_types %}
                            <option value="{{ dish_type.dish_type_no }}">{{ dish_type.dish_type_name }}</option>
                        {% endfor %}

                      </select>
                </label>
            </div>
          </div>
          <div class="form-group">
            <div class="col-sm-offset-2 col-sm-10">
              <button type="submit" class="btn btn-primary">添加菜</button>
            </div>
          </div>
    </form>
    <ul>
        {% for message in get_flashed_messages() %}
            <li class="alert-danger">{{ message }}</li>
        {% endfor %}
    </ul>
{% endblock %}